@extends('layout.index')
@section('title','配置修改')
@section('content')
<div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">用户修改</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading">
             <!-- 读取闪存中 session的值 -->
          <a class="alert-link" href="#"> {{session('error')}} </a>
        </div>
      

        @if (count($errors) > 0)
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-lg-6">
                    <form role="form" action="{{url('/admin/config/update')}}" method="post" enctype="multipart/form-data">
                                    <input type="hidden" name="oldlogo" value="{{$data->logo}}">
                       
                                                           {{csrf_field()}}
                                                           <div class="box-body">
                                                               <div class="form-group">
                                                                   <label for="exampleInputEmail1">网站标题</label>
                                                                   <input type="text" name="title" value="{{$data->title}}" class="form-control" id="exampleInputEmail1"
                                                                          placeholder="请输入网站标题">
                                                                    <input type="hidden" name = id value="{{$data->id}}">
                                                                    <input type="hidden" name = oldlogo value="{{$data->logo}}">
                                                                    
                                                               </div>
                                                               <div class="form-group">
                                                                   <label for="exampleInputPassword1">网站关键字</label>
                                                                  <input type="text" name="keywords" value="{{$data->keywords}}"class="form-control" id="exampleInputEmail1"
                                                                          placeholder="请输入网站关键字">  
                                                               </div>
                                                               

                                                               <div class="form-group">
                                                                   <label for="exampleInputEmail1">网站logo</label>
                                                                   <img src="{{$data->logo}}" width="250" height="60">
                                                                   <input type="file" name="logo">
                                                                   
                                                               </div>                                                                   
                                                               
                                                               <div class="form-group">
                                                                   <label for="exampleInputEmail1">网站版权</label>
                                                                   <input type="text" name="copy" value="{{$data->copy}}"class="form-control" id="exampleInputEmail1"
                                                                          placeholder="请输入网站版权">
                                                               </div>
                                                               <div class="form-group">
                                                                   <label for="exampleInputEmail1">网站描述</label>
                                                                   <input type="text" name="represent" value="{{$data->represent}}"class="form-control" id="exampleInputEmail1"
                                                                          placeholder="请输入网站描述">
                                                               </div>
                                                               
                                                               <div class="form-group">
                                                                   <label for="exampleInputEmail1">网站开关</label>
                                                               <input type="radio" name="status" value="0"
                                                                           @if($data->status==0)
                                                                           checked
                                                                           @endif
                                                                           >开
                                                               <input type="radio" name="status" value="1"
                                                                           @if($data->status==1)
                                                                           checked
                                                                           @endif
                                                                           >关
                                                               </div>

                                                           </div><!-- /.box-body -->

                                                           <div class="box-footer">
                                                               <input  type="submit" class="btn btn-primary" value="修改">
                                                               <input type="reset" class="btn btn-danger" value="重置">

                                                           </div>
                                                       </form>
                    </form>
                </div>
                
            </div>
            <!-- /.row (nested) -->
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>

@endsection